#include <iostream>
using namespace std;

class AAA
{
public:
	void fct() {
		cout << "AAA"<<endl;
	}
};

class BBB : public AAA
{
public:
	void fct() {
		cout << "BBB" << endl;
	}
};

int main()
{
	BBB *b = new BBB;
	b -> fct();
	//BBB b;
	//b.fct();
	//AAA *a = new AAA;
	//a -> fct();
	AAA a;
	a.fct();

	return 0;
}